<template>
	<view class="content">
		<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
			<swiper-item v-for="item,index in list">
				<view class="swiper-item">
					<image :src="'../../static'+item.icon" mode="" style="width: 90%; height: 240px;"></image>
				</view>
			</swiper-item>
		</swiper>

		<swiper :indicator-dots="true" :autoplay="true">

			<swiper-item>
				<uni-section title="功能列表" >
					<uni-grid :column="5">
						<uni-grid-item v-for="item,index in type" >
							<view class="grid-item">
								<image :src="'../../static'+item.icon" style="width: 20px;height: 20px;" mode="">
								</image>
								<text>{{item.typename}}</text>
							</view>
						</uni-grid-item>
					</uni-grid>
				</uni-section>
			</swiper-item>

			<swiper-item>
				<uni-section sub-title="点击展开">
					<uni-grid :column="5">
						<uni-grid-item>
							<view class="grid-item">
								<image :src="'../../static/more2.png'" style="width: 45px;height: 45px;" mode="">
								</image>
								<text>更多</text>
							</view>
						</uni-grid-item>
					</uni-grid>
				</uni-section>
			</swiper-item>

		</swiper>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				"list": [{
						"id": 1,
						"icon": "/images/school1.jpg"
					},
					{
						"id": 2,
						"icon": "/images/school2.jpg"
					},
					{
						"id": 3,
						"icon": "/images/school3.jpg"
					},
					{
						"id": 4,
						"icon": "/images/school4.jpg"
					}
				],
				"type": [{
						"id": 1,
						"typename": "新闻",
						"icon": "/images/news.png"
					},
					{
						"id": 2,
						"typename": "公告",
						"icon": "/images/announcement.png"
					},
					{
						"id": 3,
						"typename": "同学",
						"icon": "/images/classmate.png"
					},
					{
						"id": 4,
						"typename": "电话",
						"icon": "/images/telephone.png"
					},
					{
						"id": 5,
						"typename": "留言",
						"icon": "/images/leaveword.png"
					}
				]
			}
		},
		methods: {

		}
	}
</script>

<style>
	.container {
		padding: 0;
		font-size: 14px;
		line-height: 24px;
	}

	.grid-item {
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
	}
</style>